<?php

include_once('TopApi.php');
$top_session = "24523150b447abcb617cc1d7b58ce71ad7230";  // SESSION
$iid = 2304232983;
$new_image_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'preview.jpg';
echo $new_image_path;
$req = new TopRequest('taobao.item.img.upload');
$req->set_param('iid', $iid);
$req->set_param('image', '@' . $new_image_path); 
$req->set_param('is_major', 'true');
$result = $req->execute($top_session); // 
var_dump($result);